" ruledef syntax file
" Filename:     ruledef.vim
" Language:     Circonus Rule Definition format
" Maintainer:   Daniel Pope <dan@mauveinternet.co.uk>
" URL:
" Last Change:
" Version:
"

" Copied from the cfengine, ruby, and perl syntax files
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
  syntax clear
elseif exists("b:current_syntax")
  finish
endif


syn keyword Keyword       class define node
syn keyword Keyword       use metric
syn keyword Keyword       alert
syn keyword Label         as format at severity if for value inherits using

syn match cmpOp '>\|<\|==\|!='
syn match String '"[^"]*"' contains=Variable,QVariable
syn match Number '[0-9]\+'
syn match Number '[0-9]\+[hms]'

syn match Comment       "\s*#.*$"

syn match Identifier '[A-Za-z][A-Za-za-z.-]*'

syn match Variable  "\$\w\+"
syn match QVariable  "\${\w\+}" contained

hi link Variable Include
hi link Label   Type 
hi link cmpOp SpecialChar
hi link QVariable Variable

let b:current_syntax = "rule"
